<%--
  Created by IntelliJ IDEA.
  User: 12241
  Date: 2020/10/26
  Time: 23:29
  To change this template use File | Settings | File Templates.
--%>
<%@ page import="com.Students.pojo.Student" %>
<%@ page import="java.util.List" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<html>
<head>
    <base href="<%=basePath%>">
    <title>学生管理</title>
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-cache">
    <meta http-equiv="Expires" content="0">
    <meta http-equiv="Keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <%
        List<Student> list = (List<Student>)request.getAttribute("Student");
    %>
</head>
<body>
    <h3>学生管理</h3>
    <table border="1" width="90%" cellpadding="0" cellspacing="0">
        <tr>
            <td>学号</td>
            <td>姓名</td>
            <td>班级</td>
            <td>电话</td>
            <td><a href="add.jsp">增加</a> </td>
        </tr>
        <%int ii=0;
        for (Student stu:list){
            ii++;
        %>
        <tr>
            <td><%=ii%>></td>
            <td><%=stu.getStu_ID()%></td>
            <td><%=stu.getStu_name()%></td>
            <td><%=stu.getStu_clazz()%></td>
            <td><%=stu.getStu_phone()%></td>
            <td><a href="FindStudentServlet?id="<%=stu.getStu_ID()%>">修改</a> </td>
            <td><a href="DelStudentServlet?id="<%=stu.getStu_ID()%>>删除</a> </td>
        </tr>
        <%}%>
    </table>
</body>
</html>
